package com.qingke.demo2;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class SpringTest3 {
	@Test
	public void demo1(){
		ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
		Car car = (Car) applicationContext.getBean("car");
		System.out.println(car);
	}
	@Test
	public void demo2(){
		ApplicationContext app = new ClassPathXmlApplicationContext("applicationContext.xml");
		CollectionBean coll = (CollectionBean) app.getBean("collection");
		System.out.println(coll);
	}

}
